<?php
require_once("/home/bluecbhv/Back-End/Jcuhelpers-WebTech/Stored_Data/Search_Results.php");
require_once("/home/bluecbhv/Back-End/Jcuhelpers-WebTech/JavaScript/Web_Design_Trends/Grid_Layout.php");
?>

<!-- /************************************************************/ -->

<script>
function setGridLayout(numRows) {
	var arrayCount = 0;
		
	for (i = 0; i < numRows; i++) {
		for (j = 0; j < (arrayCount+3); j++) {
			if ((j%3) == 0) {
				showGrid_1(JSON_Data.Search_Results[j].Title,
								JSON_Data.Search_Results[j].Domain,
								JSON_Data.Search_Results[j].Link,
								JSON_Data.Search_Results[j].Thumbnail,
								JSON_Data.Search_Results[j].Keywords
							);
			} else if ((j%3) == 1) {
				showGrid_2(JSON_Data.Search_Results[j].Title,
								JSON_Data.Search_Results[j].Domain,
								JSON_Data.Search_Results[j].Link,
								JSON_Data.Search_Results[j].Thumbnail,
								JSON_Data.Search_Results[j].Keywords
							);
			} else if ((j%3) == 2) {
				showGrid_3(JSON_Data.Search_Results[j].Title,
								JSON_Data.Search_Results[j].Domain,
								JSON_Data.Search_Results[j].Link,
								JSON_Data.Search_Results[j].Thumbnail,
								JSON_Data.Search_Results[j].Keywords
							);
			}
			arrayCount++;
		}
	}
}
</script>